New installed header file that contains portability macros.
authorMartin Nordholts <martinn@src.gnome.org>
Sat, 17 Jan 2009 10:43:32 +0000 (10:43 +0000)
committerMartin Nordholts <martinn@src.gnome.org>
Sat, 17 Jan 2009 10:43:32 +0000 (10:43 +0000)
* babl/babl-macros.h: New installed header file that contains
portability macros.

* babl/babl.h: Include it and don't define portability macros
here.

* babl/Makefile.am: Add it.

svn path=/trunk/; revision=367

ChangeLog
babl/Makefile.am
babl/babl-macros.h [new file with mode: 0644]
babl/babl.h

index ae74ca4abf8008954b1ad59419f42d093141b012..22312fffd7838af9371b4343752801855ba2e021 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-17  Martin Nordholts  <martinn@svn.gnome.org>
+
+       * babl/babl-macros.h: New installed header file that contains
+       portability macros.
+
+       * babl/babl.h: Include it and don't define portability macros
+       here.
+
+       * babl/Makefile.am: Add it.
+
 2009-01-15  Martin Nordholts  <martinn@svn.gnome.org>
 
        * babl/babl.h: Make BablClassType an int again, it doesn't make
index 5b358697db667fe0d2072cc312840733f530d662..c0a7c43b6851ae9a2f3401f88148f06b02281048 100644 (file)
@@ -37,6 +37,7 @@ h_sources  =                          \
        babl-db.h                       \
        babl-ids.h                      \
        babl-internal.h                 \
+       babl-macros.h                   \
        babl-memory.h                   \
        babl-util.h                     \
        babl.h                          \
@@ -53,6 +54,7 @@ library_include_HEADERS =             \
        babl-fish.h                     \
        babl-format.h                   \
        babl-image.h                    \
+       babl-macros.h                   \
        babl-model.h                    \
        babl-sampling.h                 \
        babl-type.h                     \
diff --git a/babl/babl-macros.h b/babl/babl-macros.h
new file mode 100644 (file)
index 0000000..7eae084
--- /dev/null
@@ -0,0 +1,32 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2005-2008, Øyvind Kolås and others.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _BABL_MACROS_H
+#define _BABL_MACROS_H
+
+#ifndef _BABL_H
+#error  this file is only to be included by babl.h
+#endif
+
+#if     __GNUC__ >= 4
+#define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__))
+#else
+#define BABL_ARG_NULL_TERMINATED
+#endif
+
+#endif
index 74d9dbac84f1e7bbf3726c75cef94d45b42b44bf..dfc17901b56c64d093884b7c8312d22643fb9912 100644 (file)
@@ -30,6 +30,8 @@
 #error babl.h included after babl-internal.h
 #endif
 
+#include "babl-macros.h"
+
 /* magic number used at the start of all babl objects, used to do
  * differentiation in polymorphic functions. (as well as manual
  * type check assertions).
@@ -83,12 +85,6 @@ void   babl_init       (void);
  */
 void   babl_destroy    (void);
 
-#if     __GNUC__ >= 4
-#define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__))
-#else
-#define BABL_ARG_NULL_TERMINATED
-#endif
-
 typedef int  (*BablEachFunction) (Babl *entry,
                                   void *data);